package bigdata.dao;

import bigdata.pojo.Permission;
import bigdata.pojo.Role;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface RoleMapper extends Mapper<Role> {
	//@SelectProvider, @Insert @Update @Delete
	@Select("SELECT p.* FROM smbms_role_permission rp, smbms_permission p WHERE rp.perm_id=p.id AND rp.role_id=#{roleid}")
	List<Permission> getPermissionByRoleId(Integer roleid);
}
